//
//  CmtSecAttenDetailSTableViewCell.m
//  Products_B
//
//  Created by lanou on 16/5/31.
//  Copyright © 2016年 朋学友. All rights reserved.
//

#import "CmtSecAttenDetailSTableViewCell.h"
#import <UIImageView+WebCache.h>
@interface CmtSecAttenDetailSTableViewCell ()
@property(nonatomic,strong)UIImageView *head_img;
@property(nonatomic,strong)UILabel *nickLabel;
@property(nonatomic,strong)UILabel *contentLabel;
@property(nonatomic,strong)UILabel *creat_time;
@end

@implementation CmtSecAttenDetailSTableViewCell



-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
    
        _head_img = [[UIImageView alloc]initWithFrame:CGRectMake(10, 10, 30, 30)];
        _head_img.layer.cornerRadius = 15;
        _head_img.layer.masksToBounds = YES;
        [self.contentView addSubview:_head_img];
        
        _nickLabel = [[UILabel alloc]initWithFrame:CGRectMake(50, 15, 150, 25)];
        _nickLabel.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:_nickLabel];
        
        _contentLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 50, kWidth, 30)];
        _contentLabel.font = [UIFont systemFontOfSize:12];
        _contentLabel.tintColor = [UIColor grayColor];
        _contentLabel.numberOfLines = 0;
        [self.contentView addSubview:_contentLabel];
        
        _creat_time = [[UILabel alloc]initWithFrame:CGRectMake(kWidth - 100 - 20, 15, 60, 25)];
        _creat_time.font = [UIFont systemFontOfSize:12];
        
        _creat_time.tintColor = [UIColor grayColor];
        [self.contentView addSubview:_creat_time];
    }
    return self;
}

-(void)setModel:(CmtSecAttenComment *)model{

    [self.head_img sd_setImageWithURL:[NSURL URLWithString:model.head_img]];
    self.nickLabel.text = model.nick;
    self.contentLabel.text = model.content;
    self.creat_time.text = model.create_time;

}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
